<?php
namespace api\models;
/**
 * @author qingyu8@staff.weibo.com
 * @date 2018/02/03
 */

class User extends \common\models\User {
    public function rules() {
        return array_merge(parent::rules(), [
            [

                [
                    'phone',
                    'password'
                ],
                'required',
                'on' => self::SCENARIO_LOGIN_PW
            ],
            [
                [
                    'phone',
                    'verifyCode'
                ],
                'required',
                'on' => self::SCENARIO_LOGIN_VERIFYCODE
            ],
        ]);
    }
}
